﻿namespace ManagerClinic.Core.Business
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using ManagerClinic.Core.DataAccess;
    using ManagerClinic.Core.Common;

    public class ThuPhiDichVuBusiness
    {
        ThuPhiDichVuDataAccess objDa = null;

        public ThuPhiDichVuBusiness()
        {
            objDa = new ThuPhiDichVuDataAccess();
        }

        public bool InsertThuPhiDichVu(ThuPhiDichVuEntity obj)
        {
            return objDa.InsertThuPhiDichVu(obj);
        }

        public bool EditThuPhiDichVu(ThuPhiDichVuEntity obj)
        {
            return objDa.EditThuPhiDichVu(obj);
        }

        public bool DeleteThuPhiDichVu(string maThuPhi)
        {
            return objDa.DeleteThuPhiDichVu(maThuPhi);
        }

        public ThuPhiDichVuEntity GetThuPhiDichVu(string maThuPhi)
        {
            return objDa.GetThuPhiDichVu(maThuPhi);
        }

        public List<ThuPhiDichVuEntity> GetThuPhiDichVuList()
        {
            return objDa.GetThuPhiDichVuList();
        }

        /// <summary>
        /// The mothod support to get all ThuPhiDichVuEntity by MaPhieuDichVu, MaDichVu
        /// </summary>
        /// <param name="maPhieuDichVu"></param>
        /// <param name="maDichVu"></param>
        /// <returns></returns>
        public List<ThuPhiDichVuEntity> GetThuPhiDichVuListByMaPhieuDichVu_MaDichVu(string maPhieuDichVu, string maDichVu)
        {
            return objDa.GetThuPhiDichVuListByMaPhieuDichVu_MaDichVu(maPhieuDichVu, maDichVu);
        }

        public List<ThuPhiDichVuEntity> GetAllDanhSachBenhNhanThuPhi(DateTime ngayVaoKham, int daDongTien)
        {
            return objDa.GetAllDanhSachBenhNhanThuPhi(ngayVaoKham, daDongTien);
        }

        /// <summary>
        /// The method support to remove data by MaPhieuDichVu
        /// </summary>
        /// <param name="MaPhieuDichVu">maPhieuDichVu</param>
        /// <returns>true or false</returns>
        public bool DeleteThuPhiDichVuByMaPhieuDichVu(string maPhieuDichVu)
        {
            return objDa.DeleteThuPhiDichVuByMaPhieuDichVu(maPhieuDichVu);
        }

        /// <summary>
        /// Hien thi tat ca cac chi tiet chi tiet trong bang thu phi theo ma ho so
        /// </summary>
        /// <param name="maHoSo">MaHoSo</param>
        /// <returns></returns>
        public IList<ThuPhiDichVuEntity> GetThuPhiDichVuByMaHoSo(string maHoSo)
        {
            return objDa.GetThuPhiDichVuByMaHoSo(maHoSo);
        }
    }
}
